package com.simon.train.batch.feign;

import com.simon.train.common.Result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;

//@FeignClient("business")
@FeignClient(name = "business", url = "http://127.0.0.1:8004/business")
public interface BusinessFeign {

    @GetMapping("/hello")
    String TestHello();

    @GetMapping("/admin/dailyTrain/GenerateDaily/{date}")
    Result<Object> GenerateDaily(
            @PathVariable
            @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);

}
